<template>
  <div class="app-container">
    <el-button type="text" icon="el-icon-arrow-left" @click="$router.push({ name: 'Smartlock' })">返回</el-button>
    <div>
      <el-tabs v-model="activeName" stretch>
        <el-tab-pane label="离线授权" name="pass">
          <keep-alive>
            <pass-pane v-if="activeName=='pass'"/>
          </keep-alive>
        </el-tab-pane>
        <el-tab-pane label="开门记录" name="record">
          <keep-alive>
            <unlock-record-pane v-if="activeName=='record'"/>
          </keep-alive>
        </el-tab-pane>
      </el-tabs>
    </div>

  </div>
</template>

<script>
import PassPane from './components/passPane'
import UnlockRecordPane from './components/unlockRecordPane'

export default {
  name: 'LockDetail',
  components: { PassPane, UnlockRecordPane },
  data() {
    return {
      activeName: 'pass'
    }
  }
}
</script>
